﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ShowGroupsByUser.aspx.vb" Inherits="HauntedNetworkingSite.ShowGroupsByUser" %>

<%@ Register src="Banner.ascx" tagname="Banner" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:Banner ID="Banner1" runat="server" />
    
    </div>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        Showing groups created by  
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" CssClass="gridclass"
            DataSourceID="ShowGroupsByUserDataSource" HeaderStyle-CssClass="titleclass" RowStyle-Width="80%" Width="80%">
            <Columns>
                <asp:ImageField DataImageUrlField="GroupImage" HeaderText="Group Image">
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="GroupProfile.aspx?ID={0}" 
                    DataTextField="GroupName" HeaderText="Group Name" />
                <asp:BoundField DataField="GroupLocation" HeaderText="GroupLocation" 
                    SortExpression="GroupLocation" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="ShowGroupsByUserDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PlacesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:PlacesConnectionString.ProviderName %>" 
            SelectCommand="SELECT [GroupImage], [GroupName], [GroupLocation], [ID] FROM [groups] WHERE ([UserName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="UserName" QueryStringField="UserName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    </form>
    </body>
</html>